import i18next from "i18next";
import {initReactI18next} from 'react-i18next';
import Languagedetector from "i18next-browser-languagedetector";
export const SupportLanguages = ['en','zh-CN'];

const resources = {
    en:{
        translation:{
            app_name:"测试应用",
            top_menu:{
                home:"Home",
                chat:"Chat",
                mall:"Mall",
                myblog:"My Blog",
                document:"Documents",
                aboutus:"About us",
                more:"More"
            },
            nav_menu_home:"Home",
        }
    },
    "zh":{
        translation:{
            app_name:"Test app",
            top_menu:{
                home:"首页",
                chat:"聊天",
                mall:"商城",
                myblog:"我的博客",
                document:"文档",
                aboutus:"关于我们",
                more:"更多"
            },
            nav_menu_home:"首页",
        }
    }
}

i18next.use(Languagedetector).use(initReactI18next).init({
    resources,
    lng:"en",
    interpolation:{
        escapeValue:false
    },
    debug:true
})

export default i18next;